import numpy
myDat=numpy.loadtxt('Batting.csv',delimiter=',',dtype='str')

heltonDat=myDat[(myDat[:,0]=='heltoto01')]
heltonYears=numpy.asarray(heltonDat[:,1],dtype='i')
heltonDoubles=numpy.asarray(heltonDat[:,10],dtype='f')

thisInd=[(myDat[:,1]==str(thisYear)) & (numpy.asarray(myDat[:,7],dtype='i') > 100) for thisYear in heltonYears]
avgDoubles=[numpy.average(numpy.asarray(myDat[thisYr,10],dtype='i')) for thisYr in thisInd]
